package com.wxq.workpad.lailiao

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class LaiLiaoFragmentAdapter(fm: FragmentManager, fragments:MutableList<Fragment>,titles:MutableList<String>) : FragmentPagerAdapter(fm) {

    private var mFragments:MutableList<Fragment>
    private var mTitles:MutableList<String>

    init {
        mFragments=fragments
        mTitles=titles

    }

    override fun getPageTitle(position: Int): CharSequence? {
        return mTitles.get(position)
    }
    override fun getCount(): Int {
        return mFragments.size
    }

    override fun getItem(position: Int): Fragment {
        return mFragments.get(position)
    }
}